\hypertarget{class_port_adapter}{\section{Port\+Adapter类 参考}
\label{class_port_adapter}\index{Port\+Adapter@{Port\+Adapter}}
}


端口适配器类  




{\ttfamily \#include $<$Port\+Adapter.\+h$>$}

类 Port\+Adapter 继承关系图\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{class_port_adapter}
\end{center}
\end{figure}
\subsection*{Public 成员函数}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_port_adapter_a4261cce80b5d5029f58f976905476792}{\hyperlink{class_i_o_device}{I\+O\+Device} $\ast$ {\bfseries get\+Port} ()}\label{class_port_adapter_a4261cce80b5d5029f58f976905476792}

\item 
sint32 \hyperlink{class_port_adapter_a05171a90e41cc3320435bab766b915c7}{bind} (\hyperlink{class_i_o_device}{I\+O\+Device} $\ast$device, int buf\+Size)
\begin{DoxyCompactList}\small\item\em 绑定端口设备 \end{DoxyCompactList}\item 
sint32 \hyperlink{class_port_adapter_a2b0dc7add4fa5bd3f854fcc25f768647}{unbind} ()
\begin{DoxyCompactList}\small\item\em 解绑端口设备 \end{DoxyCompactList}\item 
sint32 \hyperlink{class_port_adapter_af09ea309e155b8354c4916d6097e8f4f}{send\+Data} (const char $\ast$buf, int size)
\begin{DoxyCompactList}\small\item\em 发送数据包 \end{DoxyCompactList}\item 
\hypertarget{class_port_adapter_a03b3cbe80ca732055d7a306a767909d3}{virtual void {\bfseries recieved\+Data} (const char $\ast$buf, int size)=0}\label{class_port_adapter_a03b3cbe80ca732055d7a306a767909d3}

\end{DoxyCompactItemize}


\subsection{详细描述}
端口适配器类 

\begin{DoxyNote}{注解}
none 
\end{DoxyNote}


\subsection{成员函数说明}
\hypertarget{class_port_adapter_a05171a90e41cc3320435bab766b915c7}{\index{Port\+Adapter@{Port\+Adapter}!bind@{bind}}
\index{bind@{bind}!Port\+Adapter@{Port\+Adapter}}
\subsubsection[{bind}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Port\+Adapter\+::bind (
\begin{DoxyParamCaption}
\item[{{\bf I\+O\+Device} $\ast$}]{device, }
\item[{int}]{buf\+Size}
\end{DoxyParamCaption}
)}}\label{class_port_adapter_a05171a90e41cc3320435bab766b915c7}


绑定端口设备 


\begin{DoxyParams}{参数}
{\em device} & I\+O设备 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回\+S\+T\+A\+T\+U\+S\+\_\+\+O\+K,失败返回\+S\+T\+A\+T\+U\+S\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_port_adapter_af09ea309e155b8354c4916d6097e8f4f}{\index{Port\+Adapter@{Port\+Adapter}!send\+Data@{send\+Data}}
\index{send\+Data@{send\+Data}!Port\+Adapter@{Port\+Adapter}}
\subsubsection[{send\+Data}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Port\+Adapter\+::send\+Data (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{buf, }
\item[{int}]{size}
\end{DoxyParamCaption}
)}}\label{class_port_adapter_af09ea309e155b8354c4916d6097e8f4f}


发送数据包 


\begin{DoxyParams}{参数}
{\em packet} & 数据包 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回发送的字节数,失败返回\+S\+T\+A\+T\+U\+S\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_port_adapter_a2b0dc7add4fa5bd3f854fcc25f768647}{\index{Port\+Adapter@{Port\+Adapter}!unbind@{unbind}}
\index{unbind@{unbind}!Port\+Adapter@{Port\+Adapter}}
\subsubsection[{unbind}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Port\+Adapter\+::unbind (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_port_adapter_a2b0dc7add4fa5bd3f854fcc25f768647}


解绑端口设备 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回\+S\+T\+A\+T\+U\+S\+\_\+\+O\+K,失败返回\+S\+T\+A\+T\+U\+S\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}


该类的文档由以下文件生成\+:\begin{DoxyCompactItemize}
\item 
libemb/inc/\hyperlink{_port_adapter_8h}{Port\+Adapter.\+h}\item 
libemb/src/Port\+Adapter.\+cpp\end{DoxyCompactItemize}
